package main

import (
	"fmt"
	"reflect"
)

type Animal struct {
}

func (a *Animal) Eat() {
	fmt.Println("eat")
}

func main() {

	c := make(chan string)
	close(c)

	animal := Animal{}
	atype := reflect.ValueOf(&animal)
	for i := 0; i < atype.NumMethod(); i++ {
		fmt.Println(atype.Method(i).Call([]reflect.Value{}))
		fmt.Println(atype.MethodByName("Eat").Call([]reflect.Value{}))
	}

}
